#include"add.h"

int top=100;

int main()
{
    //每次下载的多少
    int total=0;
    while(total<=target)
    {
        total+=once;//要先加再加载，防止停在99%
        usleep(sleep_time);
        if(total>1024*500&&top)
        {
            total=1024*500;
            top--;
        }
        process(total*100.0/target);
    }
    process(max);
    printf("\n");//防止打印完之后内容被命令行覆盖

    return 0;
}
